﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PeonyShop.Bussiness;
using System.Data;

namespace PeonyShop
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int iCate;

                if (Request.QueryString["cate"] != null)
                    iCate = Convert.ToInt32(Request.QueryString["cate"]);
                else
                    iCate = 1;

                BImage bImg = new BImage();
                DataTable dt = bImg.GetAllImgShowHome(string.Empty, iCate, 0, 0, 1, 1, 1, false);

                /*
                DataTable dtHome = ds.Tables[0];
                DataSet otherDs = bImg.GetOtherImgShowHome(1,1);
                DataTable dtOther;
                if (otherDs != null) 
                {
                    dtOther = otherDs.Tables[0];
                    if (dtOther.Rows.Count > 0)
                    {
                        dtHome = dtOther.Clone();
                        foreach (DataRow dr in dtOther.Rows)
                        {
                            dtHome.ImportRow(dr);
                        }

                    }
                }
                 **/
                repImg.DataSource = dt;
                repImg.DataBind();
            }
        }
    }
}